<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
</head>
<body>
<!--行内写法-->
<button onclick="alert('请先登录')">点击试玩</button>
<button onclick="console.log('哈哈哈')"></button>
<!--内部写法：推荐写在body结束之前-->
<div id="d1">哈哈哈</div>
<script>
    console.log(d1);
    console.log('只想')
</script>
<!--引入外部js，如果引入了外部js，则该标签不能写js代码，写了也不执行-->
<script src="01.js">

</script>
</body>
</html>